<template>
  <div class="lazyTreePosition" h100>
    <el-tree
      v-loading="loading"
      ref="tree"
      @node-expand="nodeExpand"
      :expand-on-click-node="false"
      :default-expanded-keys="expands"
      :render-after-expand="false"
      @node-click="nodeClick"
      v-bind="$attrs"
      v-on="$listeners"
      node-key="id"
      accordion
      :data="treeData"
      :props="relation"
    >
      <template slot-scope="{node,data}">
        <span v-if="!data.hasOwnProperty('_state_')">{{data.label}}</span>
        <span class="load-item" v-else-if="data._state_">
          <el-link class="reload" type="danger">加载失败,重新加载</el-link>
        </span>
        <span class="load-item" v-else>
          <i class="el-icon-loading"></i>
          加载中...
        </span>
      </template>
    </el-tree>
  </div>
</template>

<script>
export default {

}
</script>

<style lang="less" scoped>
.lazyTreePosition{

}
</style>
